<template name="visitorForward">
	<div class="forward-chat">
		<div class="edit-form">
			<h3>{{_ "Forward_chat"}}</h3>
			{{#with visitor}}
				<div class="input-line">
					<label for="name">{{_ "Name"}}</label>
					<span>{{username}}</span>
				</div>
			{{/with}}
			<form>
				<div class="input-line">
					<label for="name">{{_ "Forward_to_department"}}</label>
					<div class="form-group">
						{{> livechatAutocompleteUser
							onClickTag=onClickTagDepartment
							list=selectedDepartments
							onSelect=onSelectDepartments
							collection='CachedDepartmentList'
							endpoint='livechat/department.autocomplete'
							field='name'
							sort='name'
							icon="queue"
							label="Enter_a_department_name"
							placeholder="Enter_a_department_name"
							name="department"
							noMatchTemplate="userSearchEmpty"
							templateItem="popupList_item_channel"
							template="roomSearch"
							noMatchTemplate="roomSearchEmpty"
							modifier=departmentModifier
							conditions=departmentConditions
						}}
					</div>
				</div>
				<div class="form-divisor">
					<span>{{_ "or"}}</span>
				</div>

				<div class="input-line">
					<label for="agent">{{_ "Forward_to_user"}}</label>
					<div class="form-group">
						{{> livechatAutocompleteUser
							onClickTag=onClickTagAgent
							list=selectedAgents
							onSelect=onSelectAgents
							collection='UserAndRoom'
							endpoint='users.autocomplete'
							field='username'
							sort='username'
							label="Select_a_user"
							placeholder="Select_a_user"
							name="agent"
							icon="at"
							noMatchTemplate="userSearchEmpty"
							templateItem="popupList_item_default"
							modifier=agentModifier
							conditions=agentConditions
						}}
					</div>
				</div>
				<div class="input-line">
					<label>{{_ "Leave_a_comment"}} ({{_ "optional"}})</label>
					<div class="form-group">
						<textarea name="comment" class="rc-input__element" rows="6"></textarea>
					</div>
				</div>
				<div class="rc-user-info__flex rc-user-info__row">
					<button class='rc-button cancel' type="button"><span>{{_ "Cancel"}}</span></button>
					<button class='rc-button rc-button--primary save'><span>{{_ "Forward"}}</span></button>
				</div>
			</form>
		</div>
	</div>
</template>
